package PTA2.ti11;

import java.util.Scanner;

/**
 * @author Lenovo
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int number = scanner.nextInt();
        if(number>=0&&number<=15){
            String hex = Integer.toHexString(number).toUpperCase();
            System.out.println(hex);

        }
        else {
            System.out.println("Invalid input");
        }
        scanner.close();

    }
}
